-
Notifications
You must be signed in to change notification settings - Fork 684
Add notes to jerry_create_undefined #4790
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add notes to jerry_create_undefined #4790
Conversation
6243768
to
fdcee3e
Compare
docs/02.API-REFERENCE.md
Outdated
@@ -8176,6 +8176,11 @@ main (void) | |||
|
|||
Creates a `jerry_value_t` representing an undefined value. | |||
|
|||
*Notes*: | |||
- Calling [jerry_release_value](#jerry_release_value) is optional. | |||
- Calling [jerry_acquire_value](#jerry_acquire_value) is optional. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would write something like this:
The undefined value is a fixed constant. Its value can be copied any number of times without calling jerry_acquire_value
, and freeing it with jerry_release_value
is optional.
This is also true for true/false/null values, so add this comment to them.
fdcee3e
to
c558213
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Break these comments into two lines, they are too long.
Please also rewrite the commit message as well.
docs/02.API-REFERENCE.md
Outdated
@@ -6870,6 +6870,9 @@ jerry_create_shared_arraybuffer_external (const jerry_length_t size | |||
|
|||
Create a jerry_value_t representing a boolean value from the given boolean parameter. | |||
|
|||
*Notes*: | |||
- The undefined value is a fixed constant. Its value can be copied any number of times without calling [jerry_acquire_value](#jerry_acquire_value), and freeing it with [jerry_release_value](#jerry_release_value) is optional. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
undefined value -> boolean values (true/false)
docs/02.API-REFERENCE.md
Outdated
@@ -7238,6 +7241,9 @@ jerry_create_number_nan (void); | |||
|
|||
Creates and returns a `jerry_value_t` with type null object. | |||
|
|||
*Notes*: | |||
- The undefined value is a fixed constant. Its value can be copied any number of times without calling [jerry_acquire_value](#jerry_acquire_value), and freeing it with [jerry_release_value](#jerry_release_value) is optional. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
undefined ->null
c558213
to
a017e9f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
only a minor change needed
docs/02.API-REFERENCE.md
Outdated
@@ -6870,6 +6870,10 @@ jerry_create_shared_arraybuffer_external (const jerry_length_t size | |||
|
|||
Create a jerry_value_t representing a boolean value from the given boolean parameter. | |||
|
|||
*Notes*: | |||
- The boolean values (true/false) are fixed constants. Its value can be copied any number of times without calling |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Its value -> Their values
…te_boolean JerryScript-DCO-1.0-Signed-off-by: Mate Dabis [email protected]
a017e9f
to
fc995bb
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
No description provided.